package com.booking.dao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.booking.dao.entity.UserInfo;
import com.booking.dao.mapper.UserInfoMapper;
import com.booking.dao.service.UserInfoService;
import org.springframework.stereotype.Service;

/**
 * @author Qikai.Lin
 * @date 2023/4/21
 */
@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoService {
    @Override
    public UserInfo queryByUsername(String username) {
        QueryWrapper<UserInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username", username);
        return this.baseMapper.selectOne(queryWrapper);
    }
}
